﻿using System;
using System.ComponentModel;
using System.Linq;
using ProjectEuler.Linq;
using System.Collections.Generic;

namespace ProjectEuler.Problems
{
    [EulerProblem(24, "2783915460")]
    [Description("What is the millionth lexicographic permutation of the digits 0, 1, 2, 3, 4, 5, 6, 7, 8 and 9?")]
    internal sealed class Problem024 : EulerProblem
    {
        private static readonly Int32[] Digits = (0).To(9).ToArray();

        public override Object Solve()
        {
            return Digits.Permutation(1000000 - 1).ToJoinedString();
        }
    }
}
